<template>
  <div class="home-view">
    <div class="header">
      <h1 class="title">Vue3 移动端项目</h1>
    </div>
    <div class="content">
      <van-rate v-model="value1" />
      <button class="btn" @click="navigateToAbout">关于页面</button>
    </div>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { useRouter } from "vue-router";

const router = useRouter();
const value1 = ref(2);

const navigateToAbout = () => {
  router.push("/about");
};
</script>

<style scoped>
.header {
  padding: 20px;
  background-color: #409eff;
  color: white;
  text-align: center;
}

.title {
  font-size: 18px;
  font-weight: bold;
}

.content {
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
}

.btn {
  padding: 10px 20px;
  background-color: #409eff;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}
</style>
